import React from 'react'
import { Button, Divider, Icon, Tooltip } from 'antd'
import { FormattedMessage } from 'react-intl'

const RefreshTool = ({refreshTime, refresh}) => {
  return <span>
    <Tooltip title={<FormattedMessage id='最近刷新时间'/>}>
      <Icon type='history' />
      {refreshTime}
    </Tooltip>
    <Divider type='vertical' />
    <Button type='primary'
      icon='sync'
      onClick={refresh}>
      <FormattedMessage id='刷新' />
    </Button>
  </span>
}
export default RefreshTool
